Skip to content

Conversation

@angela28chen
Copy link
Collaborator

@angela28chen angela28chen commented Jan 5, 2026

Notable changes:

  • Rename install/ to pkg/ and have separate folders within for host tools, device resources, and plugins
  • Change logic for locating resources
    • Remove CMAKE_GENERATED_INSTALL_DIR_PATH and predict the location of different resources relative to the location of the host tool.
    • Split the resolving logic into separate functions that forces the caller to specify which type of resource they are looking for (so that the caller doesn't need knowledge of the layout of resources dir)
    • Using device_resources library to expose related CMAKE_GENERATED_* values, to try and keep fewer libraries regenerated upon SHA changing
  • Fix the mac install/deploy process, moving some processes (macdeployqt, signing, copying of plugin folders and etc.) out of cmake's install stage and into a separate bash script. This is done because cmake's install portion is inflexible (difficult to even add log messages) and it's error-prone to insert blocks of code.
  • Changed BUILD.md to reference scripts rather than repeat their contents

PSAs:

  • Make sure to install with cmake right after building and before running any tests, or Dive might not be able to locate resources
  • dive_profiling_plugin and other external plugins should be copy pasted into pkg/plugins/ now. Best is to do this step when setting up repo & don't delete pkg/plugins while rebuilding

@angela28chen
Copy link
Collaborator Author

The next and last step planned is to make the "unified build folder" by putting build_android and pkg/ (formerly install/) under build

@angela28chen
Copy link
Collaborator Author

angela28chen commented Jan 6, 2026

High-level summary of pkg/ which was formerly the install/ folder

.
├── device
│   ├── DEVICE_RESOURCES_VERSION.csv
│   ├── gfxr-replay.apk
│   ├── gfxrecon.py
│   ├── libVkLayer_dive.so
│   ├── libVkLayer_gfxreconstruct.so
│   ├── libVkLayer_khronos_validation.so
│   ├── libVkLayer_rt_dive.so
│   ├── libwrap.so
│   ├── libXrApiLayer_dive.so
│   └── XrApiLayer_dive.json
├── dive.app
│   └── Contents
├── host
│   ├── dive_client_cli
│   └── NOTICE
└── plugins
    ├── dive_profiling_plugin
    └── dive_sample_plugin

Host tools, UI, mac application should all be able to locate these resources when launched from under pkg/. Also have support for Windows specifically and launching UI from build\ui\Debug\dive.exe for the VS debugger users. For releases, if the file structure here is preserved then the files should still be locatable.

@angela28chen angela28chen marked this pull request as ready for review January 6, 2026 18:37
@hysw
Copy link
Collaborator

hysw commented Jan 6, 2026

What is the rationale to put host tool in pkg/host instead of pkg?

@angela28chen
Copy link
Collaborator Author

What is the rationale to put host tool in pkg/host instead of pkg?

It's a little easier to copy files from pkg/host/ for the apple bundle, also if you want to do a clean build for just the host side you can rm -rf pkg/host. I think in general it also helps with understanding the system while we still have the dual build thing (i.e. these are the direct outputs from building host tools).

@angela28chen angela28chen force-pushed the fix-mac2 branch 3 times, most recently from e9e2219 to 26b0b05 Compare January 7, 2026 18:35
@angela28chen
Copy link
Collaborator Author

angela28chen commented Jan 8, 2026

Manual Testing (2026/01/16 1:15 EST):

  • Windows
    • manually added profiling plugin folder
    • pkg\host\dive_client_cli.exe --version
    • Verified UI "About Dive" correct version string and 3rd party license files (from VS debugger)
  • Mac
    • manually added profiling plugin folder
    • dive_client_cli --version (three locations)
    • Verified UI "About Dive" correct version string and 3rd party license files (from launching app bundle)

@angela28chen
Copy link
Collaborator Author

angela28chen commented Jan 13, 2026

I just realized this PR has an issue with handling paths for plugins, I am working on fixing that

EDIT: addressed this, note that pkg/plugins exists now

@angela28chen angela28chen force-pushed the fix-mac2 branch 2 times, most recently from f41bbc3 to a303dee Compare January 13, 2026 20:49
…erated variables, some fixes for plugins, add search path for VS debugger use
…resubmits, changed documentation to reflect that order, fixed executable locations for the UI regression tests
hysw
hysw previously approved these changes Jan 16, 2026
wangra-google
wangra-google previously approved these changes Jan 16, 2026
footballhead
footballhead previously approved these changes Jan 16, 2026
@angela28chen angela28chen disabled auto-merge January 16, 2026 20:41
@angela28chen angela28chen enabled auto-merge (squash) January 16, 2026 20:47
auto-merge was automatically disabled January 16, 2026 21:00

Pull request was closed

@angela28chen angela28chen reopened this Jan 16, 2026
@angela28chen
Copy link
Collaborator Author

github bug with invisible unresolved comment that blocks merging, will recreate PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants